<#ftl/>
package ${saveDtoPackage};

<#if swagger>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
</#if>
import lombok.Data;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
* <p>
    * ${table.comment!}
    * </p>
* @author ${author}
* @since ${date}
*/

@Data
<#if swagger>
@ApiModel(value = "${entity}DTO对象", description = "${table.comment!}保存模型")
</#if>
public class ${saveDtoClassName} {
<#assign excludes=['createTime','updateTime']/>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if !excludes?seq_contains(field.propertyName)>
        <#if field.comment!?length gt 0>
            <#if swagger>
    /**
    * ${field.comment}
    */
    @ApiModelProperty("${field.comment}")<#else>
    /**
    * ${field.comment}
    */</#if>
        </#if>
        <#if field.columnType.type=="LocalDateTime"||field.columnType.type=="Date">
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        </#if>
        <#if !field.keyFlag && !field.metaInfo.nullable>
            <#if field.columnType.type=="String">
    @NotBlank(message = "${field.comment!field.propertyName}不能为空")
            <#else>
    @NotNull(message = "${field.comment!field.propertyName}不能为空")
            </#if>
        </#if>
    private ${field.propertyType} ${field.propertyName};

    </#if>
</#list>
<#------------  END 字段循环遍历  ---------->
}
